import {
    Component,
    OnInit,
    ViewEncapsulation,
    AfterViewInit,
    ViewChild,
    ElementRef,
    NgZone,
    OnDestroy,
    Injector
} from '@angular/core';

import {AbmComponent} from 'angular-baidu-maps';

import {AppComponentBase} from '@shared/app-component-base';

import { AppConsts } from '@shared/AppConsts';

import { WaterWindowVm } from './../water-sampling.model';

@Component({selector: 'water-window',
    templateUrl: './water-window.component.html', styleUrls: [
]})
export class WaterWindowComponent extends AppComponentBase {

    nativeElement: HTMLElement;

    constructor(injector : Injector,private el : ElementRef) {
        super(injector);
        console.log(el);
        this.nativeElement = el.nativeElement;
        // this._vm = new WaterWindowVm();

    }

    private _vm: WaterWindowVm;

    set vm(vm: WaterWindowVm){
        console.log(vm);
        this._vm = vm;
    }

    get vm(){
        return this._vm;
    }


    gridStyle = {
        width: '50%',
        textAlign: 'center',
        padding: '10px'
      };

    getMarkerImage(markerImage){
        let url_ = AppConsts.remoteServiceBaseUrl + "/Common/Images/MapImages/"+markerImage;
        return url_;

    }

}
